﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace SanctusSoftware.CcliSongSelectLib
{
  public class SongPart : INotifyPropertyChanged
  {

    #region Events

    public event PropertyChangedEventHandler PropertyChanged;

    private void OnPropertyChanged(string propertyName)
    {
      if (PropertyChanged != null)
      {
        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
      }
    }

    public event EventHandler NameChanged;

    protected void OnNameChanged()
    {
      if (NameChanged != null)
      {
        NameChanged(this, new EventArgs());
      }
    }

    public event EventHandler WordsChanged;

    protected void OnWordsChanged()
    {
      if (WordsChanged != null)
      {
        WordsChanged(this, new EventArgs());
      }
    }

    #endregion

    #region Properties

    private string _Name = string.Empty;

    public string Name
    {
      get { return _Name; }
      set
      {
        _Name = value;
        OnPropertyChanged("Name");
        OnNameChanged();
      }
    }

    private string _Words = string.Empty;

    public string Words
    {
      get { return _Words; }
      set
      {
        _Words = value;
        OnPropertyChanged("Words");
        OnWordsChanged();
      }
    }




    #endregion


  }
}
